/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package de.tor.obj.action.impl;

import de.tor.obj.action.AbstractMovement;

/**
 *
 * @author Charon
 */
public class SinusMovement extends AbstractMovement{
 /** Creates a new instance of LinearMovement */
    public SinusMovement(double pStartX, double pStartY, double pVertSpeed ) {
        setXPos(pStartX);
        setYPos(pStartY);
        setVerticalSpeed(pVertSpeed);
        setHorizontalSpeed(pVertSpeed);
    }

    public void update(long elapsedTime) {
        setYPos(getYPos() + getVerticalSpeed() * elapsedTime);
        setXPos(getXPos() + getHorizontalSpeed() * elapsedTime);
    }
}
